/*
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2023-04-17 20:51:40
 */
const express = require('express')
const router = express.Router()

//导入搜索模块
const searchRouter = require('../router_handle/search')

//验证是否是好友
router.get('/checkfriend', (req, res) => {
    let uid = req.query.uid
    let fid = req.query.fid
    searchRouter.isFriend(uid, fid, res)
})
 
//搜索用户
router.get('/user', searchRouter.searchUser)

//搜索群名
router.get('/group', searchRouter.searchGroup)

//验证是否在群内
router.get('/isInGroup', (req, res) => {
    let uid = req.query.uid
    let gid = req.query.gid
    searchRouter.isInGroup(uid, gid, res)
})


module.exports = router